<style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style>
<template src="./index.html"></template>
<script>
export default {
  mixins: [
    Vue.prototype.$vFN.Mixins.Base,
    Vue.prototype.$vFN.Mixins.Page,
    Vue.prototype.$vFN.Mixins.Table,
  ],
  data() {
    return {
      appWindow: window,
      // 页面接口地址
      apiUrl: {
        list: "mall-site-portal/platform-operation-log/list",
      },
      // 表格查询数据
      mixinTable_tableSearchData: {},

      // 列表高级查询参数
      mixinTable_tableSearchSenior: {
        // 操作开始时间
        createdTimeStartStr: {
          type: String,
          value: null,
          default: null,
        },
        // 操作结束时间
        createdTimeEndStr: {
          type: String,
          value: null,
          default: null,
        },
        // 操作账户
        opAccount: {
          type: String,
          value: "",
          default: "",
        },
        // 操作模块
        opModule: {
          type: String,
          value: "",
          default: "",
        },
      },

      pickerOptions: {
        shortcuts: [
          {
            text: "今天",
            onClick(picker) {
              picker.$emit("pick", new Date());
            },
          },
          {
            text: "昨天",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit("pick", date);
            },
          },
          {
            text: "一周前",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", date);
            },
          },
        ],
      },
    };
  },
  methods: {
    // 初始化
    async init() {
      this.mixinTable_refreshData();
    },

    startChange(date_) {
      this.init();
    },
    endChange(date_) {
      this.init();
    },
  },
  mounted() {
    this.init();
  },
  activated() {},
};
</script>
